<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0,user-scalable=no,maximum-scale=1.0,minimum-scale=1.0'>
    <meta http-equiv='X-UA-Compatible' content='ie=edge'>
    <title>Document</title>
    <script>
        getRem(750, 100)
        window.onresize = function () {
            getRem(750, 100)
        };
        //用来设置html的font-size
        function getRem(pwidth, prem) {
            //获取html元素
            var html = document.getElementsByTagName("html")[0];
            //获取视窗宽度
            //下面的代码是为了考虑兼容性
            //在IE7、IE8、Firefox中，document.body.clientWidth以及 document.body.clientHeightzhi值为0，此时，可以使用 document.documentElement.clientHeight等代替。
            var oWidth = document.documentElement.clientWidth || document.body.clientWidth;
            html.style.fontSize = oWidth / pwidth * prem + "px";
        }
    </script>
    <link rel="stylesheet" href="./css/demo.css">
</head>

<body>
    <header class="clearfix">
        <div class="left">
            <a href="#">
                <img src="https://img.alicdn.com/imgextra/i1/690311/TB2cMR0aQUmBKNjSZFOXXab2XXa_!!690311.png" alt="">
            </a>
        </div>
        <div class="right">
            <a href="#">
                <img src="https://img.alicdn.com/imgextra/i2/690311/TB2beKvaTXYBeNkHFrdXXciuVXa_!!690311.png" alt="">
            </a>
        </div>
    </header>
</body>

</html>